<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
        <html><head>
        <link rel="stylesheet" type="text/css" href="apidocs.css"/>
        <title>API docs for &ldquo;sympy.ntheory.generate.Sieve&rdquo;</title>
        </head>
        <body><h1 class="class">Class s.n.g.Sieve:</h1><span id="part">Part of <a href="sympy.ntheory.generate.html">sympy.ntheory.generate</a></span><div class="toplevel"><div><p>An infinite list of prime numbers, implemented as a dynamically growing 
sieve of Eratosthenes. When a lookup is requested involving a number that 
has not been sieved, the sieve is automatically extended up to that 
number.</p>
</div></div><table class="children"><tr class="function"><td>Function</td><td><a href="#sympy.ntheory.generate.Sieve.__repr__">__repr__</a></td><td><span class="undocumented">Undocumented</span></td></tr><tr class="function"><td>Function</td><td><a href="#sympy.ntheory.generate.Sieve.extend">extend</a></td><td><div><p>Grow the sieve to cover all numbers &lt;= N.</p>
</div></td></tr><tr class="function"><td>Function</td><td><a href="#sympy.ntheory.generate.Sieve.extend_to_no">extend_to_no</a></td><td><div><p>Extend to include (at least) the nth prime number</p>
</div></td></tr><tr class="function"><td>Function</td><td><a href="#sympy.ntheory.generate.Sieve.primerange">primerange</a></td><td><div><p>Generate all prime numbers in the range [a, b).</p>
</div></td></tr><tr class="function"><td>Function</td><td><a href="#sympy.ntheory.generate.Sieve.search">search</a></td><td><div><p>For n &gt;= 2, return the tightest a, b such that</p>
</div></td></tr><tr class="function"><td>Function</td><td><a href="#sympy.ntheory.generate.Sieve.__contains__">__contains__</a></td><td><span class="undocumented">Undocumented</span></td></tr><tr class="function"><td>Function</td><td><a href="#sympy.ntheory.generate.Sieve.__getitem__">__getitem__</a></td><td><div><p>Return the nth prime number</p>
</div></td></tr></table>
            <div class="function">
            <div class="functionHeader">def <a name="sympy.ntheory.generate.Sieve.__repr__">__repr__(self):</a></div>
            <div class="functionBody"><div class="undocumented">Undocumented</div></div>
            </div>
            <div class="function">
            <div class="functionHeader">def <a name="sympy.ntheory.generate.Sieve.extend">extend(self, N):</a></div>
            <div class="functionBody"><div><p>Grow the sieve to cover all numbers &lt;= N.</p>
</div></div>
            </div>
            <div class="function">
            <div class="functionHeader">def <a name="sympy.ntheory.generate.Sieve.extend_to_no">extend_to_no(self, n):</a></div>
            <div class="functionBody"><div><p>Extend to include (at least) the nth prime number</p>
</div></div>
            </div>
            <div class="function">
            <div class="functionHeader">def <a name="sympy.ntheory.generate.Sieve.primerange">primerange(self, a, b):</a></div>
            <div class="functionBody"><div><p>Generate all prime numbers in the range [a, b).</p>
</div></div>
            </div>
            <div class="function">
            <div class="functionHeader">def <a name="sympy.ntheory.generate.Sieve.search">search(self, n):</a></div>
            <div class="functionBody"><div><p>For n &gt;= 2, return the tightest a, b such that self[a] &lt;= n &lt;= 
self[b]</p>
</div></div>
            </div>
            <div class="function">
            <div class="functionHeader">def <a name="sympy.ntheory.generate.Sieve.__contains__">__contains__(self, n):</a></div>
            <div class="functionBody"><div class="undocumented">Undocumented</div></div>
            </div>
            <div class="function">
            <div class="functionHeader">def <a name="sympy.ntheory.generate.Sieve.__getitem__">__getitem__(self, n):</a></div>
            <div class="functionBody"><div><p>Return the nth prime number</p>
</div></div>
            </div></body>
        